<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <meta content="<%= page_key %>" name="Keywords"/>
    <meta content="<%= page_des %>" name="Description"/>
    <title><%= page_title %></title>
    <%= stylesheet_link_tag 'kongtiao','jquery.ui.css',:cache=>true %>
    <%= javascript_include_tag 'jquery.min','jquery-ui.min','jrails',:cache=>true %>
  </head>
  <body>
    <div class="wrapper">
      <div class="top_nav">
        <% if logged_in? %>
          <strong>欢迎 <%=h current_user.login %></strong>
          <%= link_to '退出', logout_path %>
        <% else %>
          <strong>您还没有登录</strong>
          <%= link_to '登录', login_path %> | <%= link_to '注册', signup_path %>
        <% end %>
        <% cache :controller=>"navigations",:action=>"list",:part=>"top_nav" do %>
          <% @top_nav=Navigation.find_all_by_style(1,:order=>"nav_order") %>
          <% for nav in @top_nav -%>
            <span><a href="<%=nav.link %>"><%= nav.name %></a></span>
          <% end -%>
        <% end %>
      </div>
      <div class="top_logo">
        <div class="left"><a href="/"><img src="/images/logo.jpg"></a></div><div class="right"><img src="/images/phone.jpg"></div>
      </div>
      <div class="top_menu">
        <% cache :controller=>"navigations",:action=>"list",:part=>"menu" do %>
          <% @top_nav=Navigation.find_all_by_style(0,:order=>"nav_order") %>
          <ul>
            <% for nav in @top_nav -%>
              <li><a href="<%=nav.link %>"><%= nav.name %></a></li>
            <% end -%>
          </ul>
        <% end %>

      </div>
      <div class="sub_menu">
        <% cache :controller=>"list_items",:action=>"list",:part=>"pinpai" do %>
          <% @pingpai=get_list_items(2) %>
          <% for nav in @pingpai -%>
            <%= link_to nav.display_name,list_products_path("p[#{nav.template_id}][#{nav.data_type_id}]"=>nav.id) %>
          <% end -%>
        <% end %>
        <%= yield :sub_menu %>
      </div>
     <%= "<p style='color: green;'>#{flash[:notice]}</p>" if flash[:notice] %>
    </div>
    <div class="wrapper">
      <%= yield  %>
    </div>
    <div class="wrapper">
      <% cache :controller=>"webconfigs",:action=>"list" do %>
        <% @configs=get_configs %>
        <div class="foot">
          <div class="left"><img src="/images/foot_logo.gif" align="center"/></div>
          <div class="right">
            <ul class="boot_nav">
              <% for bottom_nav in  @configs %>
                <%= link_to bottom_nav.description,detail_path(bottom_nav.name) %><%="<span>&nbsp;|</span>" unless bottom_nav==@configs.last %>
              <% end %>
            </ul>
            <p>Copyright 2003-2008 topkongtiao, All Rights Reserved</p>
            <p>版权所有:空调采集网</p>
          </div>
        </div>
      <% end %>
      <%= yield :links %>
    </div>
    <div id="loading_indicator">Loading...</div>
  </body>
</html>